/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package automate;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;

/**
 *
 * @author S219
 */
class TimerListener implements ActionListener {
    Diapositives diapo;
    public TimerListener(Diapositives diapo) {
        this.diapo = diapo;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        System.out.println("bip");
        switch(diapo.getEtat()){
            case 0:
                break;
            case 1:
                break;
            case 2:
            case 3:
            case 4:
                diapo.diapoSuivante();
                break;
            case 5:
            case 6:
            case 7:
                System.out.println("On est à l'état 7 !!");
                System.out.println(diapo.getImage_en_cours().getName());
                System.out.println("image select : " + diapo.getImage_selectionnee().getName());
                diapo.diapoPrecedente();
                break;
        }
    }
}
